package edu.csl.study.springboot.eventDemo.javabean;

/**
 * 测试JDK提供的PropertyChangeEvent
 */
public class Test {
    public static void main(String[] args) {
        PaymentStatusUpdateBean paymentStatusUpdateBean = new PaymentStatusUpdateBean();

        // 添加监听器
        paymentStatusUpdateBean.addPropertyChangeListener(new PaymentStatusUpdateListener_Email());
        paymentStatusUpdateBean.addPropertyChangeListener(new PaymentStatusUpdateListener_Stock());
        // 更新支付状态
        paymentStatusUpdateBean.updateStatus(3);
    }
}
